package com.example.demo02.utils;

import com.example.demo02.listener.event.BaseEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

@Component
public class EventUtils {
    @Autowired
    private ApplicationEventPublisher applicationEventPublisher;

    public void publishEvent(BaseEvent event){
        applicationEventPublisher.publishEvent(event);
    }
}
